/*
 * @Description: 峰谷平设置
 * @FilePath: \hk-iot\src\api\gather\gatherHighLow\index.ts
 * @Date: 2023-12-05 09:39:07
 * @LastEditTime: 2023-12-05 17:11:22
 */

import request from '/@/utils/request';

/**
 * @method queryListPeakAndValleySet 查询设置
 * @method addPeakAndValleySet 新增设置
 * @method upPeakAndValleySet 更新设置
 * @method delPeakAndValleySet 删除设置
 */
export function useGatherHighLowApi() {
  return {
    queryListPeakAndValleySet: (params: object) => {
      return request({
        url: '/api/mqtt/peakAndValley/queryListPeakAndValleySet',
        method: 'POST',
        data: params,
      });
    },
    addPeakAndValleySet: (params: object) => {
      return request({
        url: '/api/mqtt/peakAndValley/addPeakAndValleySet',
        method: 'POST',
        data: params,
      });
    },
    upPeakAndValleySet: (params: object) => {
      return request({
        url: '/api/mqtt/peakAndValley/upPeakAndValleySet',
        method: 'POST',
        data: params,
      });
    },
    delPeakAndValleySet: (id: string) => {
      return request({
        url: '/api/mqtt/peakAndValley/delPeakAndValleySet',
        method: 'GET',
        params: { id },
      });
    },
  };
}
